# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=untwister
pkgver=119.a42b8f8
pkgrel=3
pkgdesc='Seed recovery tool for PRNGs.'
groups=('blackarch' 'blackarch-crypto')
arch=('x86_64' 'aarch64')
url='https://github.com/altf4/untwister'
license=('GPL3')
depends=('boost' 'cppunit')
makedepends=('git')
source=("git+https://github.com/altf4/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md \
    AddingNewPRNG.txt
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

